<template>
  <div>cat
     | {{id}}{{$route.params.id}}|{{$route.query.id}}
  </div>
</template>

<script>
export default {
    data(){
        return{
            id:"0"
        }
    },
    created(){
        let {id}=this.$route.params
         console.log(this.$route) ;  
         this.id=id? '0':this.$route.query.id;
    }

}
</script>

<style>

</style>